$rem-base: 60px;

$mediaArray: "only screen and (max-width: 359px)",
             "only screen and (min-width:360px) and (max-width:374px)",
             "only screen and (min-width:375px) and (max-width:399px)",
             "only screen and (min-width:400px) and (max-width:479px)",
             "only screen and (min-width:480px) and (max-width:539px)",
             "only screen and (min-width:540px) and (max-width:639px)",
             "only screen and (min-width:640px) ";

$ratioFor320:640/320;
$ratioFor360:640/360;
$ratioFor375:640/375;
$ratioFor400:640/400;
$ratioFor480:640/480;
$ratioFor540:640/540;
$ratioFor640:640/640;

$htmSizeArray:  floor($rem-base/$ratioFor320),
                floor($rem-base/$ratioFor360),
                floor($rem-base/$ratioFor375),
                floor($rem-base/$ratioFor400),
                floor($rem-base/$ratioFor480),
                floor($rem-base/$ratioFor540),
                floor($rem-base/$ratioFor640);

// set responsive
@for $mediaIndex from 1 to length($mediaArray) + 1 {
    $media: nth($mediaArray, $mediaIndex);
    $htmlFz: nth($htmSizeArray, $mediaIndex);
    @media #{$media}
    {
        html {
            font-size: $htmlFz;
        }
    }
}